import Layout from '@/views/layout'
import iFrame from '@/components/iframe/main'
import _import from '@/router/_import'

export const SystemRouterMaps = [
    {
        path: '',
        name: '仪表盘',
        component: Layout,
        redirect: '/dashboard',
        icon: 'el-icon-location-outline',
        noDropDown: true,
        children: [
            {
                path: 'dashboard',
                component: _import('dashboard/index')
            }
        ]
    },
    {
        name: '授权中心',
        path: '/system',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'menu',
                name: '菜单管理',
                icon: 'el-icon-menu',
                component: _import('system/menu/index')
            },
            {
                path: 'role',
                name: '角色管理',
                icon: 'el-icon-menu',
                meta: {auth: 'system:role:ui'},
                component: _import('system/role/index')

            },
            {
                path: 'user',
                name: '用户管理',
                icon: 'el-icon-menu',
                component: _import('system/user/index')
            }
        ]
    },
    {
        name: '系统管理',
        path: '/sysmgr',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'oss',
                name: '文件上传',
                icon: 'el-icon-menu',
                component: _import('system/oss/index')
            },
            {
                path: 'log',
                name: '系统日志',
                icon: 'el-icon-menu',
                component: _import('system/log/index')
            }
        ]
    },
    {
        name: '系统监控',
        path: '/monitor',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'druid',
                name: '数据源',
                component: iFrame,
                icon: 'el-icon-menu',
                meta: {src: 'http://localhost:8001/druid/index.html'}
            }
        ]
    },

    {
        name: '例子',
        path: '/demo',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'websocket-h5',
                name: 'Websocket-H5',
                icon: 'el-icon-menu',
                component: _import('demo/websocket-h5'),
            },
            {
                path: 'websocket-sockjs',
                name: 'Websocket-SockJS',
                icon: 'el-icon-menu',
                component: _import('demo/websocket-sockjs'),
            }
        ]
    },
    /*{
        name: '授权中心1',
        path: '/test',
        component: Layout,
        children: [
            {
                path: 'caigou',
                name: '采购管理',
                component: _import('test/index'),
                children: [
                    {
                        path: 'list',
                        name: '列表',
                        component: _import('test/index'),
                        hidden: true
                    },
                    {
                        path: 'form',
                        name: '表单',
                        component: _import('test/index'),
                        hidden: true
                    },
                    {
                        path: 'detail',
                        name: '详情',
                        component: _import('test/index')
                    }
                ]
            },
            {
                path: 'sys',
                name: '系统配置',
                component: _import('test/index')
            }
        ]
    }*/
]

